package com.xoa.controller.property;

import com.xoa.model.position.UserJob;
import com.xoa.model.property.Atab;
import com.xoa.model.property.AtabExample;
import com.xoa.service.property.AtabService;
import com.xoa.util.ToJson;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

@Controller
@RequestMapping("/Atab")
public class AtabController {
    @Autowired
    AtabService atabService;

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 跳转页面
     * @参数:
     */
    @RequestMapping("/fixAssetsAtab")
    public String fixAssetsAtab() {
        return "app/FixAssets/eduFixAssets/fixAssetsAtabDetail";
    }

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 新建交接
     * @参数:
     */
    @ResponseBody
    @RequestMapping("/insertSelective")
     public ToJson<Object> insertSelective(Atab record){
        ToJson<Object> toJson=atabService.insertSelective ( record);
        return toJson;
    }

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 查询交接
     * @参数:id
     */
    @ResponseBody
    @RequestMapping("/selectByPrimaryKey")
    public ToJson<Object>  selectByPrimaryKey(Integer id,Atab record) {

        ToJson<Object> toJson = atabService.selectByPrimaryKey (id,record);
        return toJson;

    }

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 删除交接
     * @参数:id
     */
    @ResponseBody
    @RequestMapping("/deleteByPrimaryKey")
    public ToJson<Object> deleteByPrimaryKey(Integer id) {
          ToJson<Object> toJson = atabService.deleteByPrimaryKey(id);
          return toJson;
    }

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 更新交接
     * @参数:
     */
    @ResponseBody
    @RequestMapping("/updateByPrimaryKeySelective")
    public ToJson<Object>  updateByPrimaryKeySelective(Atab record){

        ToJson<Object> toJson = atabService.updateByPrimaryKeySelective(record);
        return toJson;
    }

    /**
     * @作者：陈玲
     * @时间：2018/7/16
     * @介绍: 查询全部交接
     * @参数:id
     */
    @ResponseBody
    @RequestMapping("/selectByExampleWithBLOBs")
    public ToJson<Object>  selectByExampleWithBLOBs(String uid, Atab atab){
        return atabService.selectByExampleWithBLOBs (uid,atab);
    }


}
